<template>
	<view class="container">
		<uni-list>
			
			<uni-list-item  v-for="(item,index) in list"  :title="item.name" :note="item.type"
				:thumb="'http://localhost:8090/freshmenapp'+item.icon" thumb-size="lg" >
			</uni-list-item>
			
		</uni-list>
	</view>
</template>


<script>
	export default {
		data() {
			return {
				"list": [{
						"id": 1,
						"name": "小小",
						"type": "信息学院",
						"icon": "/images/cat-1.png",
						"description": "小于",
					},
					{
						"id": 2,
						"name": "ee",
						"type": "经济学院",
						"icon": "/images/cat-2.png",
						"description": "月月"
					},
				],
				offset: [20, 38],
				absolute: 'rightTop'
			}
		},
		methods: {

		},
		onLoad() {
					uni.showLoading({
						title: '加载中',
						mask: false
					});
					//urequest
					uni.request({
						url: 'http://localhost:8090/freshmenapp/user/list',
						method: 'POST',
						data: {},
						success: res => {
							console.log(res);
							this.list  =  res.data.list
							uni.showToast({
								title: '成功'
							});
							setTimeout(()=>{
								uni.hideLoading()
							},6000)
						},
						fail: () => {
							uni.showToast({
								title: '失败',
								icon: 'none'
							});
						},
						complete: () => {}
					});
				}
	}
</script>
<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
